<template>
    <rx-layout>
        <template #middle>
            <rx-fit v-model="fitSearch">
                <template #head>
                  <div style="display: flex;align-items: center;justify-content: space-between;">
                    <rx-list-title :title="i18n('list.deliverLog','移交日志')"></rx-list-title>
                    <span class="search-btn" @click.stop="searchshow" @mousedown.stop><SearchOutlined/>{{ $ti18('rxList.leachBtn', '过滤') }}</span>
                  </div>
                </template>
                <template #search>
                  <a-form layout="vertical">
                    <a-form-item :label="i18n('form.tranAccount','移交人账号')">
                      <a-input :placeholder="i18n('form.tranAccount','移交人账号','input')" v-model:value="urlConfig.queryParam.Q_DELIVER_USER_NO__S_LK"/>
                    </a-form-item>
                    <a-form-item :label="i18n('form.transferee','移交人')">
                      <a-input :placeholder="i18n('form.transferee','移交人','input')" v-model:value="urlConfig.queryParam.Q_DELIVER_USER_NAME__S_LK"/>
                    </a-form-item>
                    <a-form-item :label="i18n('form.receAccout','接管人账号')">
                      <a-input :placeholder="i18n('form.receAccout','接管人账号','input')" v-model:value="urlConfig.queryParam.Q_RECEIPT_USER_NO__S_LK"/>
                    </a-form-item>
                    <a-form-item :label="i18n('form.receiver','接管人')">
                      <a-input :placeholder="i18n('form.receiver','接管人','input')" v-model:value="urlConfig.queryParam.Q_RECEIPT_USER_NAME__S_LK"/>
                    </a-form-item>
                  </a-form>
                  <div class="list-search-toolbar">
                    <a-button type="primary" @click="search">
                      <SearchOutlined/>
                      {{ $ti18('rxList.searchBtn', '查询') }}
                    </a-button>
                    <a-button style="margin-left: 4px" @click="resetSearch">
                      <RedoOutlined />
                      {{ $ti18('rxList.resetBtn', '重置') }}
                    </a-button>
                  </div>
                </template>
                <template #middle>
                  <rx-grid ref="table"
                           :hasPage="true"
                           :urlConfig="urlConfig"
                           :selectConfig="selectConfig"
                           url="/api-bpm/bpm/core/bpmDeliverLog/query"
                           field="id"
                           :columns="columns"
                  >
                  </rx-grid>
                </template>
            </rx-fit>
        </template>
    </rx-layout>
</template>

<script>
import BpmDeliverLogApi from '@/common/api/bpm/bpmDeliverLog'
import {BaseList, RxLayout, RxFit} from '@lowcode/jpaas-base-lib';

export default {
    name: 'BpmDeliverLogList',
    mixins: [BaseList],
    components: {
        RxLayout,
        RxFit
    },
    data() {
        return {
            urlConfig: {
              ajaxType: 'post',
              contentType: 'json',
              queryParam: {},
              dataField: 'result.data',
              totalField: 'result.totalCount'
            },
            selectConfig: {
              type: 'checkbox',
            },
            columns: [
                {title: this.i18n('form.tranAccount','移交人账号'), field: 'deliverUserNo', minWidth: 100},
                {title: this.i18n('form.transferee','移交人'), field: 'deliverUserName', minWidth: 100},
                {title: this.i18n('form.receAccout','接管人账号'), field: 'receiptUserNo', minWidth: 100},
                {title: this.i18n('form.receiver','接管人'), field: 'receiptUserName', minWidth: 100},
                {title: this.$ti18('rxForm.createBy','创建人'), field: 'createByName', minWidth: 100},
                {title: this.$ti18('rxForm.createTime','创建时间'), field: 'createTime', minWidth: 100},
            ],
            comment: this.i18n('list.workLog','工作交接日志'),
            widthHeight: ['800px', '600px'],
        }
    },
    methods: {
        i18n(name, text, key) {
            return this.$ti18(name, text, "bpmDeliver", key);
        },
        delById(ids) {
            return BpmDeliverLogApi.del({ids: ids.join(',')});
        }
    }
}
</script>
<style scoped>

</style>

